<div class="modal" ng-controller="CreateNewSubProcessCtrl">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header"><h2>{{'SUBPROCESS.POPUP.CREATE-TITLE' | translate}}</h2></div>
      <div class="modal-body">
        <p>{{'SUBPROCESS.POPUP.CREATE-DESCRIPTION' | translate}}</p>
        <div class="form-group">
          <label for="newSubProcessName">{{'SUBPROCESS.NAME' | translate}}</label>
          <input auto-focus class="form-control" editor-input-check
                 id="newSubProcessName" ng-disabled="model.loading" ng-model="model.subProcess.name" type="text"
                 ui-keypress="{13:'ok()'}">
        </div>
        <div class="form-group">
          <label for="newFormDescription">{{'SUBPROCESS.DESCRIPTION' | translate}}</label>
          <textarea class="form-control" id="newFormDescription" ng-disabled="model.loading"
                    ng-model="model.subProcess.description"
                    rows="5"></textarea>
        </div>
      </div>

      <div class="modal-footer">
        <div class="pull-right">
          <button class="btn btn-sm btn-default" ng-click="cancel()" ng-disabled="model.loading" type="button">
            {{'GENERAL.ACTION.CANCEL' | translate}}
          </button>
          <button class="btn btn-sm btn-default" ng-click="ok()" ng-disabled="model.loading || !model.subProcess.name"
                  type="button">
            {{'SUBPROCESS.ACTION.CREATE-CONFIRM' | translate}}
          </button>
        </div>
        <div class="loading pull-right" ng-show="model.loading">
          <div class="l1"></div>
          <div class="l2"></div>
          <div class="l2"></div>
        </div>
      </div>
    </div>
  </div>
</div>
